const koa = require('koa')
const log = require('./log')
//express : const app = express();
const app = new koa()
//express: (req,res)
// app.use(log());

app.use(async (ctx,next) => {
  // ctx.body = "A";
  console.log("A")
  next();
  console.log("A之后")
})

app.use(async (ctx,next) => {
  // ctx.body = "B";
  console.log("B")
  next();
  console.log("B之后")
})

app.use(async (ctx,next) => {
  // ctx.body = "C";
  console.log("C")
  next();
  console.log("C之后")
})

app.listen(3000, () => {
  console.log('localhost:3000 start..')
})